package com.nq.service;


import com.nq.common.ServerResponse;
import com.nq.pojo.User;
import com.nq.vo.user.UserInfoVO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

public interface IUserService {

  boolean isLocked(String prefix, Integer userId);

  ServerResponse reg(String paramString1, String code, String paramString2, String paramString3, String paramString4, String paramString5, String country, Integer inviteCode, HttpServletRequest paramHttpServletRequest);

  ServerResponse login(String paramString1, String code, String paramString2, String paramString3, String country, HttpServletRequest paramHttpServletRequest);

  User getCurrentUser(HttpServletRequest paramHttpServletRequest);

  User getCurrentRefreshUser(HttpServletRequest paramHttpServletRequest);

  ServerResponse addOption(String paramString, String market,HttpServletRequest paramHttpServletRequest);

  ServerResponse delOption(String paramString, HttpServletRequest paramHttpServletRequest);

  ServerResponse isOption(String code, String market, HttpServletRequest paramHttpServletRequest);

  ServerResponse getUserInfo(HttpServletRequest paramHttpServletRequest);

  ServerResponse updatePwd(String paramString1, String paramString2, HttpServletRequest paramHttpServletRequest);

  ServerResponse updateUserInfo(String code, String phone, String email, String nickName, String headImg, HttpServletRequest request);

  ServerResponse updatePwd(String type, String code, String paramString1, String paramString2);

  ServerResponse setPayPwd(HttpServletRequest request, String payPwd);

  ServerResponse checkPayPwd(HttpServletRequest request, String currPayPwd);

  ServerResponse checkYzmCode(String paramString1, String paramString2, String code, String paramString3);

  ServerResponse checkForgetYzmCode(String type, String yzmCode, String code, String account);

  ServerResponse update(User paramUser);

  ServerResponse auth(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5, HttpServletRequest paramHttpServletRequest);

  ServerResponse transAmt(Integer paramInteger1, Integer paramInteger2, HttpServletRequest paramHttpServletRequest);

  void ForceSellTask();

  /**
   * 处理平仓
   * @param user
   */
  void handleClosePosition(User user);

  void ForceSellOneStockTask();
  void ForceSellOneStockTaskV2();
  void ForceSellMessageTask();

  void ForceSellIndexTask();
  void ForceSellIndexsMessageTask();

  void ForceSellFuturesTask();
  void ForceSellFuturesMessageTask();

  void qh1();

  void zs1();


  ServerResponse addSimulatedAccount(Integer agentId, String phone, String code, String pwd, String payPwd, String amt, Integer accountType, HttpServletRequest request);

  ServerResponse batchRegisterAccount(String code, String phone, String pwd, Integer count);



  ServerResponse findByUserId(Integer paramInteger);

  ServerResponse updateLock(Integer paramInteger);

  ServerResponse updateAmt(Integer paramInteger1, String paramInteger2, Integer paramInteger3, HttpServletRequest request);

  ServerResponse delete(Integer paramInteger, HttpServletRequest paramHttpServletRequest);

  int CountUserSize(Integer paramInteger);

  BigDecimal CountUserAmt(Integer paramInteger);

  BigDecimal CountEnableAmt(Integer paramInteger);

  ServerResponse authByAdmin(Integer paramInteger1, Integer paramInteger2, String paramString);

  ServerResponse findIdWithPwd(String phone);

  ServerResponse updateWithPwd(String paramString1, String paramString2);

  void updateUserAmt(Double amt, Integer user_id);


  /**
   * 查询用户收藏股票列表
   * @param changePercent
   * @param request
   * @return
   */
  ServerResponse queryOptionList(String changePercent, Integer pageNo, Integer pageSize, HttpServletRequest request);

  int updateTradingAmount(Integer id, BigDecimal tradingAmount, BigDecimal enableAmt);

  ServerResponse getUserLevel(HttpServletRequest request);

  ServerResponse updateAgentAmt(Integer userId, String amt, Integer direction, HttpServletRequest request);

  ServerResponse authByAgent(Integer userId, Integer state, String authMsg);

  ServerResponse agentDelete(Integer userId, HttpServletRequest request);


  /**
   * 获取我的上级接口
   * @param request
   * @return
   */
  ServerResponse getParentUser(HttpServletRequest request);

  /**
   * 获取我的下级接口
   * @param request
   * @return
   */
  ServerResponse listChildUser(HttpServletRequest request);

  /**
   * 获取直属下级接口
   * @param userId
   * @return
   */
  ServerResponse listChildUserByParentId(Integer userId, HttpServletRequest request);

  /**
   * 绑定上级
   * @param request
   * @param account
   * @return
   */
  ServerResponse bindParent(HttpServletRequest request, String account);

    ServerResponse deleteBank(Integer userId, HttpServletRequest request);


  ServerResponse listByAdmin(Integer userId, String beginRegTime, String endRegTime, String beginAuditTime,
                             String endAuditTime, String startAmount, String realName, String phone, String email,
                             Integer agentId, Integer accountType, int pageNum, int pageSize, Integer isActive,
                             Integer isLock, Integer isRecharge, HttpServletRequest request);

  List<UserInfoVO> listByAdminExport(Integer userId, String beginRegTime, String endRegTime,
                                     String beginAuditTime, String endAuditTime, String startAmount, String realName, String phone, String email,
                                     Integer agentId, Integer accountType, int pageNum, int pageSize, Integer isActive, Integer isLock,
                                     Integer isRecharge, HttpServletRequest request);


    ServerResponse getSuperiorAndSubordinate(Integer userId);

    // 更新用户积分
    ServerResponse updateUserIntegral(Integer userId, Integer integral, String type, boolean isIncome, Integer referId);

    ServerResponse listByAgent(Integer userId, Integer isRecharge, String realName, String phone, Integer agentId, Integer accountType, int pageNum, int pageSize, Integer isActive, HttpServletRequest request);
}

